package com.jerry.spring.security.jwt.util;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Web工具类
 *
 * @author jerry 2024/5/8 15:29
 */
public class WebUtil {

    public static String renderString(HttpServletResponse response, String string) {
        response.setStatus(200);
        response.setContentType("application/json");
        response.setCharacterEncoding("utf-8");
        try {
            response.getWriter().print(string);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
}